#include <gtest/gtest.h>

int sum(int a, int b)
{
    return a + b;
}

TEST(add_test, test1)
{
    //失败之后则推出当前函数
    ASSERT_EQ(sum(3, 1), 5);
    std::cout << "测试完毕\n";
}

TEST(add_test, test2)
{
    //失败之后继续向后执行
    EXPECT_EQ(sum(3, 1), 5);
    std::cout << "测试完毕\n";
}

int main(int argc, char *argv[])
{
    testing::InitGoogleTest(&argc, argv);
    RUN_ALL_TESTS();
    return 0;
}